const API = `/api`;

module.exports = {
  api: {
    global: {
      apilogin: `${API}/account/login`,
      apilogout: `${API}/account/logout`,
      apigetmaindevice: `${API}/api/v1/device/getMainDevToken`,  //获取主设备token
      apifresh: `${API}/api/v1/cacheratio5min/allClean`,    //刷新缓存
      apifreshdns: `${API}/api/v1/redirect/startServer`, //刷新所有配置文件
    },
    permissionset: {
      mgtname: {
        list: `${API}/admin/page`,
        add: `${API}/admin/add`,
        del: `${API}/admin/batchDelete`,
        edit: `${API}/admin/update`,
        editAllRole: `${API}/refAdminRole/add`,
        getRole: `${API}/role/list`,
      },
      mgtpower: {
        list: `${API}/role/page`,
        add: `${API}/role/add`,
        del: `${API}/role/batchDelete`,
        edit: `${API}/role/update`,
        resourceList: `${API}/securityResource/list`,
        addResource: `${API}/refRoleAuth/add`,
      },
      mgtresource: {
        list: `${API}/securityResource/page`,
        add: `${API}/securityResource/add`,
        del: `${API}/securityResource/batchDelete`,
        edit: `${API}/securityResource/update`,
        treeData: `${API}/securityResource/getTreeData`,
      },
    },

    equipment: {
      equipmentgroup: {
        apiadd: `${API}/api/v1/group/add`,
        apiedit: `${API}/api/v1/group/update`,
        apidelete: `${API}/api/v1/group/delete`,
        apigetlist: `${API}/api/v1/group/page`,
      },
      equipment: {
        apiadd: `${API}/api/v1/device/add`,
        apiedit: `${API}/api/v1/device/update`,
        apidelete: `${API}/api/v1/device/delete`,
        apigetlist: `${API}/api/v1/device/list`,
        apigetallgrouplist: `${API}/api/v1/group/list`, //获取所有设备组
        apigettoken: `${API}/api/v1/device/getToken`,   //根据设备Id,获取TOKEN
        apitogglemaindevice:`${API}/api/v1/device/updateMainDevice`,
        apigetalldevices: `${API}/api/v1/device/allDevice`, //获取所有设备
        apisyndevice: `${API}/api/v1/device/synchronization`,   //同步设备

      },
      backupservice: {
        apiadd: `${API}/api/v1/backupServer/add`,
        apiedit: `${API}/api/v1/backupServer/update`,
        apidelete: `${API}/api/v1/backupServer/delete`,
        apigetlist: `${API}/api/v1/backupServer/page`,
      },
    },

    domain: {
      domaingroup: {
        apiadd: `${API}/api/v1/domainGroup/add`,
        apiedit: `${API}/api/v1/domainGroup/update`,
        apidelete: `${API}/api/v1/domainGroup/delete`,
        apigetlist: `${API}/api/v1/domainGroup/page`,
      },
      domain: {
        apiadd: `${API}/api/v1/domain/add`,
        apiedit: `${API}/api/v1/domain/update`,
        apidelete: `${API}/api/v1/domain/delete`,
        apigetlist: `${API}/api/v1/domain/page`,
        apigetallgrouplist: `${API}/api/v1/domainGroup/getAll`, //获取所有域名组
      },
    },

    logs: {
      apigetloginlist: `${API}/api/v1/loginLog/page`,
      apigetoperationlist: `${API}/api/v1/operationLog/page`,
      apigetbackuplist: `${API}/api/v1/backupLog/page`,
      apigetrealtimelist: `${API}/api/v1/realTimeLogs/getByDeviceId`, //获取实时日志
    },
    recursivemgt: {
      transpond: {
        apigetalldevices: `${API}/api/v1/device/allDevice`, //获取所有设备
        apiaddcache: `${API}/api/v1/cache/add`, //新增缓存配置
        apiupdatecache: `${API}/api/v1/cache/update`, //修改缓存配置
        apigetcache: `${API}/api/v1/cache/getByDeviceId`, //查询缓存配置
        apigetportbyde: `${API}/api/v1/cacheratio5min/getCachePorts`, //根据设备获取端口号

        apigettranspondlist: `${API}/api/v1/forward/page`, //获取转发列表
        apiaddtranspond: `${API}/api/v1/forward/add`, //添加转发
        apiupdatetranspond: `${API}/api/v1/forward/update`, //修改转发
        apideletetranspond: `${API}/api/v1/forward/delete`, //删除转发
        apifreshconfig: `${API}/api/v1/server/startServer`, //刷新配置文件(需要传参数)

        apiimport: `${API}//api/v1/redirect/importExcel`, //导入
      },
      dns: {
        apiadd: `${API}/api/v1/redirect/add`,
        apidelete: `${API}/api/v1/redirect/delete`,
        apiedit: `${API}/api/v1/redirect/update`,
        apigetlist: `${API}/api/v1/redirect/page`,
        apifreshdns: `${API}/api/v1/redirect/startServer`, //刷新所有配置文件
      },
      optimal: {
        apiadd: `${API}/api/v1/optimize/add`,
        apidelete: `${API}/api/v1/optimize/delete`,
        apiedit: `${API}/api/v1/optimize/update`,
        apigetlist: `${API}/api/v1/optimize/page`,
      },
    },
    email: {
      apiadd: `${API}/api/v1/email/add`,
      apiedit: `${API}/api/v1/email/update`,
      apidelete: `${API}/api/v1/email/delete`,
      apigetlist: `${API}/api/v1/email/page`,
    },

    datacenter: {
      apigetcurrentqps: `${API}/api/v1/qps5min/getQps`, //获取实时qps
      apigetallqps: `${API}/api/v1/qps5min/getHisQps`, //获取历史qps

      apigetcurrentcachehit: `${API}/api/v1/cacheratio5min/getCacheData`, //获取实时缓存命中率
      apigetallcachehit: `${API}/api/v1/cacheratio5min/getCacheHisData`, //获取历史缓存命中率
      apigreshcachehit: `${API}/api/v1/cacheratio5min/clean`, //刷新

      apigetcurrentiprank: `${API}/api/v1/ipRank5min/getRank`, //获取实时ip排名
      apigetalliprank: `${API}/api/v1/ipRank5min/getHisRank`,
      apifreship: `${API}/api/v1/ipRank5min/clean`, //刷新排名缓存

      apigetcurrentdnsrank: `${API}/api/v1/parseRank5min/getRank`, //实时解析排名
      apigetalldnsrank: `${API}/api/v1/parseRank5min/getHisRank`, //历史解析排名
      apifreshdns: `${API}/api/v1/parseRank5min/clean`,

      apigetcurrenttype: `${API}/api/v1/parseType5min/getParseType`, //解析类型实时数据
      apigetalltype: `${API}/api/v1/parseType5min/getHisParseType`,
      apifreshtype: `${API}/api/v1/parseType5min/clean`,
    },
  },
};
